home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / HENSA / MATHS / PLPLOT / PLPLOT.ZIP / examples / tk / tk01 next >
Encoding:
Text File  |  1994-07-24  |  2.2 KB  |  83 lines

  1. #!xtk01 -f
  2. # Geoffrey Furnish                     -*-tcl-*-
  3. # 11 April 1994
  4. #
  5. # @> A script for using Tk to control xtk01
  6. #
  7. # $Id: tk01,v 1.7 1994/07/24 07:42:57 mjl Exp $
  8. #
  9. # $Log: tk01,v $
  10. # Revision 1.7  1994/07/24  07:42:57  mjl
  11. # Eliminated "destroy ." in favor of "exit".
  12. #
  13. # Revision 1.6  1994/07/01  20:43:59  mjl
  14. # Modified to use startup proc plstdwin when configuring main window.
  15. #
  16. # Revision 1.5  1994/06/17  21:23:09  mjl
  17. # Removed option database settings since they were the same as those set
  18. # in the pldefaults proc.
  19. #
  20. # Revision 1.4  1994/06/09  20:28:15  mjl
  21. # Changed to new improved megawidget instantiation method.
  22. #
  23. ###############################################################################
  24.  
  25. wm title . "x01c -- TK version"
  26. plstdwin .
  27.  
  28. ###############################################################################
  29. # Set up the menubar and message widgets.
  30.  
  31. frame .menu -relief raised -borderwidth 3
  32.  
  33. button .menu.one -text "One" -command "myplot 1"
  34. pack append .menu .menu.one {left expand fill}
  35.  
  36. button .menu.two -text "Two" -command "myplot 2"
  37. pack append .menu .menu.two {left expand fill}
  38.  
  39. button .menu.three -text "Three" -command "myplot 3"
  40. pack append .menu .menu.three {left expand fill}
  41.  
  42. button .menu.four -text "Four" -command "myplot 4"
  43. pack append .menu .menu.four {left expand fill}
  44.  
  45. button .menu.exit -text "Exit" -command "quit 0"
  46. pack append .menu .menu.exit {right expand fill}
  47.  
  48. message .msg \
  49.     -font -Adobe-helvetica-medium-r-normal--*-240* -aspect 200 \
  50.      -width 500 -borderwidth 1 \
  51.     -text "TK01: Control x01c from TK"
  52.  
  53. pack append . \
  54.     .menu {top fillx} \
  55.     .msg {top padx 5 pady 5 fill} 
  56.  
  57. tk_menuBar .menu .menu.one .menu.two .menu.three .menu.four .menu.exit
  58.  
  59. ###############################################################################
  60. #
  61. # This creates the plframe "megawidget".  If you just want a bare plframe,
  62. # change "plxframe" to "plframe".
  63.  
  64. plxframe .plw
  65. pack append . .plw {left expand fill}
  66.  
  67. ###############################################################################
  68. # Definitions of procedures used in this script.
  69.  
  70. # Punch eject and hold onto your seat !!!
  71.  
  72. proc quit a {
  73.     exit
  74. }
  75.  
  76. # Utility routine.
  77.  
  78. proc dpos w {
  79.     wm geometry $w +300+300
  80. }
  81.  
  82. ###############################################################################
  83.